Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Jan 15, 2025

This PR contains the following updates:

Package Type Update Change
floki (source) dev minor 0.34.3 -> 0.38.0

Release Notes

philss/floki (floki)

v0.38.0

Compare Source

Added
  • This version adds initial support for the :has pseudo-selector.
    It is a great addition that enables finding elements containing
    matching children.

    Examples for selectors:

    • "div:has(h1)"
    • "div:has(h1, p, span)"
    • "div:has(p.foo)"
    • "div:has(img[src='https://example.com'])"
    • "tr:has(*:fl-contains('TEST'))"

    Note that combinators like ">" are not allowed yet.

    Thank you @​bvobart for this feature!

Fixed
  • Add :style option documentation to Floki.text/2.
    Thanks @​s3cur3 for the fix.

  • Fix deprecation warnings for upcoming Elixir 1.19.

  • Prevent from crashing when selector is an empty string.

Removed
  • Remove support for Elixir 1.14 and OTP 23.

  • Remove deprecated functions and function clauses
    that were accepting strings (binaries).

    Affected functions:

    • parse/1 - removed function
    • map/2 - removed function
    • attr/4 - removed clause
    • find/2 - removed clause
    • text/3 - removed clause
    • text/3 - removed clause
    • attribute/2 - removed clause
    • filter_out/2 - removed clause
  • HTML must be parsed before searching. Functions like Floki.find/2,
    Floki.attribute/2, and other HTML manipulation functions no longer work
    directly with HTML strings
    . The HTML must be parsed first using
    Floki.parse_fragment/2 or Floki.parse_document/2.

    Before:

    html = "<div class='foobar'><p>Hello</p></div>"
    Floki.find(html, "p")
    Floki.attribute(html, "div", "class")

    After:

    html = "<div class='foobar'><p>Hello</p></div>"
    parsed_html = Floki.parse_fragment!(html)
    Floki.find(parsed_html, "p")
    Floki.attribute(parsed_html, "div", "class")

v0.37.1

Compare Source

Fixed
  • Move regex declaration from module tag to inside function.
    This is a fix to be compatible with the upcoming OTP 28.

v0.37.0

Compare Source

Added
Fixed
  • Fix bug propagating identity encoder in raw_html/2 - thanks @​andyleclair.
Removed
  • Remove support for Elixir 1.13 and OTP 22.

v0.36.3

Compare Source

This release contains some performance improvements, thanks to @​ypconstante.

Fixed
  • Stop Floki.get_by_id/2 traversal on first match. Thanks @​ypconstante.

  • Remove extra whitespaces from nodes without attributes on Floki.raw_html/1.
    Thank you @​ypconstante.

  • Fix Floki.raw_html/1 typespecs. Thanks @​davydog187.

v0.36.2

Compare Source

Added
  • Implement the Inspect protocol for the Floki.HTMLTree struct.
    This struct is currently private. Thank you @​vittoriabitton.
Fixed
  • Fix regression to respect config option :encode in Floki.raw_html/2.
    Thanks @​Sgoettschkes.

  • Make the Floki.raw_html/2 treat the contents of the <title> tag as plain text.
    The idea is to align with parse_document/2.
    Thank you @​aymanosman.

v0.36.1

Compare Source

Fixed
  • Fix typespec of get_by_id/2.

v0.36.0

Compare Source

Added
  • Add Floki.get_by_id/1 that returns one element by ID or nil.
    Thanks @​SteffenDE.
Changed
  • Improve options validation with Keyword.validate!/2.
    This is not a change in APIs, but the error messages and opts validation
    should be standardized now.
    Thanks @​vittoriabitton.
Removed
  • Drop support for Elixir v1.12.

v0.35.4

Compare Source

Besides the fix described below, this release also contains more performance
improvements, thanks to @​ypconstante.

Fixed
  • Fix order of results for Floki.find/2. This was a regression from the
    previous version - thanks @​ypconstante.

v0.35.3

Compare Source

This release has great performance improvements, thanks to the PRs
from @​ypconstante!

Most of the main functions, such as Floki.raw_html/2 and Floki.find/2 are
faster and are using less memory. It's something like twice as fast, and half
usage of memory for find/2, for example.

Fixed
  • Add :leex to Mix compilers. Fixes the build when running with dev version of Elixir.
    Thanks @​wojtekmach.

  • Fix Floki.raw_html/2 when a tree using attributes as maps is given.
    Thanks @​SupaMic.

  • Add a guard to Floki.find/2 so people can have a better error message when an
    invalid input is given. Thanks @​Hajto.

  • Fix parsers to consider IO data as inputs. This may change in the next version
    of Floki, as I plan to drop support for IO data.
    Thanks @​ypconstante.

Removed
  • Remove outdated Gleam wrapper code. The external functions syntax in Gleam
    has changed. So now
    the wrapper is not needed anymore.
    Thanks @​michallepicki.

v0.35.2

Compare Source

Fixed
  • Enable usage of IO data by removing a guard for binaries in the main
    parser module.

v0.35.1

Compare Source

Fixed

v0.35.0

Compare Source

Added
  • Add support for parsing attributes as maps.

    This makes parse_document/2 and parse_fragment/2 accept the option
    :attributes_as_maps to change the behaviour and return attributes as
    maps instead of lists of tuples.
    The only parser that does not support it yet is the fast_html.

Changed
  • Drop support for Elixir v1.11.

  • Change the log level of parsing logger calls from "info" to "debug".
    This will help to reduce the amount of noise in production apps.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from Clivern as a code owner January 15, 2025 01:35
@renovate renovate bot changed the title Update dependency floki to v0.37.0 Update dependency floki to v0.37.1 Mar 23, 2025
@renovate renovate bot force-pushed the renovate/floki-0.x-lockfile branch from db68877 to 8b4f6ac Compare March 23, 2025 02:38
@renovate renovate bot force-pushed the renovate/floki-0.x-lockfile branch from 8b4f6ac to 176bf9b Compare June 15, 2025 05:33
@renovate renovate bot changed the title Update dependency floki to v0.37.1 Update dependency floki to v0.38.0 Jun 15, 2025
@Clivern Clivern closed this Sep 13, 2025
@Clivern Clivern deleted the renovate/floki-0.x-lockfile branch September 13, 2025 10:13
@renovate
Copy link
Contributor Author

renovate bot commented Sep 14, 2025

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update (>= 0.30.0). You will get a PR once a newer version is released. To ignore this dependency forever, add it to the ignoreDeps array of your Renovate config.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant